import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

//定义数据模块
export const useUserInfoStore = defineStore('userinfo', () => {

  //定义需要管理的数据
  const userinfo = ref({})

  //保存用户信息
  function save_userinfo(u) {
    userinfo.value = u;
    console.log(u);
  }

  return { userinfo, save_userinfo, }
}, { persist: true })

